package com.xuxueli.applyModules.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import lombok.ToString;
import java.util.Date;


/**
 * 不能使用bulid模式会报错
 * @Accessors(chain = true) 也不能使用，数据映射不上了
 */
@Data
@ToString
@ContentRowHeight(25) //数据表格列高
@HeadRowHeight(20) //标题表格列高
@ColumnWidth(25) //标题表格列宽
public class ExcelTemplate {
    /**
     * 第一列，第二列
     * x0,x1...
     */
    //@ExcelProperty(index = 0,converter = TitleFormatConverter.class)
    //@ExcelProperty(value = "学号0",converter = TitleFormatConverter.class)
    @ExcelProperty("学号0")
    private String x0;
    //@ExcelProperty(index = 1)
    @ExcelProperty("学号1")
    private String x1;
    //@ExcelProperty(index = 2)
    @ExcelProperty("学号2")
    private String x2;
    //@ExcelProperty(index = 3)
    @ExcelProperty("学号3")
    private String x3;
    //@ExcelProperty(index = 4)
    @ExcelProperty("学号4")
    private String x4;
    //@ExcelProperty(index = 5)
    @ExcelProperty("学号5")
    private String x5;
    //@ExcelProperty(index = 6)
    @ExcelProperty("学号6")
    private String x6;
    //@ExcelProperty(index = 7)
    @ExcelProperty("学号7")
    private String x7;
    //@ExcelProperty(index = 8)
    @ExcelProperty("学号8")
    private String x8;
    //@ExcelProperty(index = 9)
    @ExcelProperty("学号9")
    private String x9;
    @DateTimeFormat("yyyy 年 MM 月 dd 日 HH 时 mm 分 ss 秒")
    //@ExcelProperty(index = 10)
    @ExcelProperty("日期格式")
    private Date timeNow = new Date();
    //@NumberFormat("#.###%")
    //@ExcelProperty(index = 11)
    @ExcelProperty("数字标题")
    private Double doubleData = 18.89D;
}
